<style type="text/css">
    #editdiv{
        display: none;
    }
</style>
<div class="page-header" id="hideshowtitle">
    <input type="hidden" value="<?php echo WEB_PATH; ?>administrator/categame/addnew" id="redirectAdd"/>
    <h1>Quản lí chuyên mục.</h1>
    <input type="text" class="form-control" style="width: 25%; display: inline;" id="inputsearch" name="jq-validation-required" placeholder="Nhập tên chuyên mục tìm kiếm.">
    <button style="vertical-align: inherit;" onclick="showall()" class="btn btn-success"><i class="menu-icon fa fa-search"></i> Tìm kiếm</button>
    <button style="vertical-align: inherit;" onclick="showall()" class="btn btn-warning"><i class="menu-icon fa fa-refresh"></i> Làm mới</button>
    <a class="btn btn-danger" onclick="effaddnew()" style="float: right;" title=""><i class="menu-icon fa fa-bars"></i> Thêm chuyên mục</a>
</div> <!-- / .page-header -->
<div class="page-header" id="hideAddtitle">
    <h1>Thêm mới chuyên mục</h1>
    <a class="btn btn-danger" onclick="showlist()" style="float: right;" title=""><i class="menu-icon fa fa-list"></i> Hiển thị dữ liệu.</a>
</div> <!-- / .page-header -->
<div class="page-header" id="hideedit">
    <h1>Chỉnh sửa chuyên mục</h1>
    <a class="btn btn-danger" onclick="showlist()" style="float: right;" title=""><i class="menu-icon fa fa-list"></i> Hiển thị dữ liệu.</a>
</div> <!-- / .page-header -->

<!--add new-->
<div class="row" id="ctaddnew">
    <div class="col-sm-12" >


        <div class="panel-heading" id="mesadd">
            <span class="panel-title" id="addOk" style="color: #C93C04"><i class="menu-icon fa fa-plus"></i> Vui lòng nhập thông tin bên dưới.</span>

        </div>
        <div class="panel-body">
            <div class="form-group">
                <label for="inputPassword" class="col-sm-2 control-label">Tên chuyên mục</label>
                <div class="col-sm-10">
                    <input type="text"  required pattern="[a-zA-Z0-9]{3,14}" class="form-control" name="cateName" id="catename" placeholder="Nhập tên chuyên mục.">
                    <p class="help-block" id="catenamemes" style="color: red;"></p>
                </div>
            </div> <!-- / .form-group -->
            <div class="form-group">
                <label for="inputPassword" class="col-sm-2 control-label">Mô tả</label>
                <div class="col-sm-10">
                    <textarea class="form-control textf" id="descate" name="descriptioncate" rows="3"></textarea>

                </div>
            </div> <!-- / .form-group -->
            <div class="form-group" style="margin-bottom: 0;">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="submit" name="btn" value="btn" onClick="addnewcatalog();" class="btn btn-success "><i class="fa fa-upload"></i> Thêm mới</button>
                    <button type="submit" name="btn" value="btn" onClick="effcloseaddnew();" class="btn btn-warning "><i class="fa fa-times"></i> Hủy bỏ</button>
                </div>
            </div> <!-- / .form-group -->
        </div>

        <!-- /10. $FORM_EXAMPLE -->

    </div>
</div>
<!--end add cate-->
<div class="row" id="hidelist">
    <div class="col-sm-12">
        <div class="panel">
            <div class="panel-heading">
                <span class="loaddingvv" id="loadding"><img src="<?php echo WEB_PATH; ?>public/loading.gif" width="16" height="16"/></span>
                <span class="panel-title" style="color: #366a10;"><i class="menu-icon fa fa-list-ul"></i> Danh sách chuyên mục.</span>

            </div>
            <input type="hidden" id="url" value="<?php echo WEB_PATH ?>superadmin/categories.fy"/>
            <div class="panel-body">
                <table class="table">
                    <thead>
                        <tr>
                            <th>STT</th>
                            <th>Tên chuyên mục</th>
                            <th>Mô tả chuyên mục</th>
                            <th>Tạo lúc</th>
                            <th>Sửa lần cuối</th>
                            <th>#</th>

                        </tr>
                    </thead>
                    <tbody id="listView">
                        

                    </tbody>
                </table>

            </div>
        </div>
        <!-- /5. $DEFAULT_TABLES -->

    </div>

</div>
<!--------show edit data-->
<div class="row" id="editdiv">
    <div class="col-sm-12">
        <div class="panel">
            <div class="panel-heading">
                <span class="loaddingvv" id="loadding"><img src="<?php echo WEB_PATH; ?>public/loading.gif" width="16" height="16"/></span>
                <span class="panel-title" style="color: #366a10;"><i class="menu-icon fa fa-list-ul"></i> Chỉnh sửa chuyên mục.</span>

            </div>
            <input type="hidden" id="url" value="<?php echo WEB_PATH ?>controlpanel/categories/catalog"/>
            <div class="panel-body" id="dataedit">
               
            </div>
        </div>
        <!-- /5. $DEFAULT_TABLES -->

    </div>

</div>
<script src="<?php echo WEB_PATH_HEADER; ?>ajaxsite/categoriesAjax.js"></script>